package Api.StringJoiner;

import java.util.StringJoiner;

/*
* StringJoiner->用于字符串拼接
* */
public class Demo1 {
    public static void main(String[] args)
    {
        //java1 java2 java3
        StringJoiner s=new StringJoiner(",","[","]");//分隔符，前缀，后缀
        s.add("java1");
        s.add("java2");
        s.add("java3");
        System.out.println(s);

    }
}
